package com.qzd.strategy;

import java.util.HashMap;
import java.util.Map;

public class FormulaFactory {
    private static final Map<String,Object> Formula=new HashMap<String, Object>();
    static {
        Formula.put(Constant.formula01,new Formula01());
        Formula.put(Constant.formula02,new Formula02());
    }
    interface Constant{
       String formula01="formula01";
       String formula02="formula02";
    }
    private FormulaFactory (){};
    public static Formula getInstance(String keys){
        return (Formula)Formula.get(keys);
    }
}
